<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/5/30
  Time: 9:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的layui页面</title>
    <link rel="stylesheet" media="all" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
    <script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
</head>
<body>

<table class="layui-hide" id="demo" lay-filter="test"></table>
<script>
    layui.use(['table', 'form', 'upload'], function () {
        var table = layui.table


        //第一个实例 表格渲染
        table.render({
            elem: '#demo'
            , height: 550
            , url: '${pageContext.request.contextPath}/Log/findAllLog' //数据接口
            , page: true //开启分页
            , limit: 10
            , limits: [5, 10, 15, 20, 25, 30, 50, 100]
            , method: 'post'
            , autoSort: true //禁用前端自动排序
            , cols: [[ //表头
                {field: 'id', title: 'ID', width: 120, sort: true,fixed:'left'}
                , {field: 'loginName', title: '登录名', width: 120}
                , {field: 'userName', title: '用户名', width: 120}
                , {field: 'ip', title: 'IP', width: 140}
                , {field: 'className', title: '类名', width: 180}
                , {field: 'methodName', title: '方法名', width: 180}
                , {field: 'params', title: '参数', width: 180, sort: true}
                , {field: 'createTime', title: '创建时间', width: 140}
            ]]
        });
    });
</script>
</body>
</html>
